#函数的参数传递

#参数个数
def fact1():
    print("我也是函数")

fact1()

#可选参数传递
def fact2(n, m = 1):
    s = 1
    for i in range(1, n + 1):
        s *= i
    return s//m

print(fact2(10))
print(fact2(10, 5))          #位置传递
print(fact2(m = 5, n = 10))  #名称传递

#可变参数传递
def fact3(n, *b):
    s = 1
    for i in range(1, n + 1):
        s *= i 
    for item in b:
        s *= item
    return s

print(fact3(10, 3))
print(fact3(10, 3, 5, 8))